Optimal. Leaf size=45 \[ \frac {a A x^{1+m}}{1+m}+\frac {(A b+a B) x^{2+m}}{2+m}+\frac {b B x^{3+m}}{3+m} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {77}
\begin {gather*} \frac {x^{m+2} (a B+A b)}{m+2}+\frac {a A x^{m+1}}{m+1}+\frac {b B x^{m+3}}{m+3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rubi steps
\begin {align*} \int x^m (a+b x) (A+B x) \, dx &=\int \left (a A x^m+(A b+a B) x^{1+m}+b B x^{2+m}\right ) \, dx\\ &=\frac {a A x^{1+m}}{1+m}+\frac {(A b+a B) x^{2+m}}{2+m}+\frac {b B x^{3+m}}{3+m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 57, normalized size = 1.27 \begin {gather*} \frac {x^{1+m} (a (3+m) (A (2+m)+B (1+m) x)+b (1+m) x (A (3+m)+B (2+m) x))}{(1+m) (2+m) (3+m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 53, normalized size = 1.18
method | result | size |
norman | \(\frac {\left (A b +B a \right ) x^{2} {\mathrm e}^{m \ln \left (x \right )}}{2+m}+\frac {A a x \,{\mathrm e}^{m \ln \left (x \right )}}{1+m}+\frac {B b \,x^{3} {\mathrm e}^{m \ln \left (x \right )}}{3+m}\) | \(53\) |
risch | \(\frac {x \left (B b \,m^{2} x^{2}+A b \,m^{2} x +B a \,m^{2} x +3 B b m \,x^{2}+A a \,m^{2}+4 A b m x +4 B a m x +2 b B \,x^{2}+5 A a m +3 A b x +3 B a x +6 A a \right ) x^{m}}{\left (3+m \right ) \left (2+m \right ) \left (1+m \right )}\) | \(97\) |
gosper | \(\frac {x^{1+m} \left (B b \,m^{2} x^{2}+A b \,m^{2} x +B a \,m^{2} x +3 B b m \,x^{2}+A a \,m^{2}+4 A b m x +4 B a m x +2 b B \,x^{2}+5 A a m +3 A b x +3 B a x +6 A a \right )}{\left (3+m \right ) \left (2+m \right ) \left (1+m \right )}\) | \(98\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 53, normalized size = 1.18 \begin {gather*} \frac {B b x^{m + 3}}{m + 3} + \frac {B a x^{m + 2}}{m + 2} + \frac {A b x^{m + 2}}{m + 2} + \frac {A a x^{m + 1}}{m + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 92 vs.
\(2 (45) = 90\).
time = 2.26, size = 92, normalized size = 2.04 \begin {gather*} \frac {{\left ({\left (B b m^{2} + 3 \, B b m + 2 \, B b\right )} x^{3} + {\left ({\left (B a + A b\right )} m^{2} + 3 \, B a + 3 \, A b + 4 \, {\left (B a + A b\right )} m\right )} x^{2} + {\left (A a m^{2} + 5 \, A a m + 6 \, A a\right )} x\right )} x^{m}}{m^{3} + 6 \, m^{2} + 11 \, m + 6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 389 vs.
\(2 (37) = 74\).
time = 0.21, size = 389, normalized size = 8.64 \begin {gather*} \begin {cases} - \frac {A a}{2 x^{2}} - \frac {A b}{x} - \frac {B a}{x} + B b \log {\left (x \right )} & \text {for}\: m = -3 \\- \frac {A a}{x} + A b \log {\left (x \right )} + B a \log {\left (x \right )} + B b x & \text {for}\: m = -2 \\A a \log {\left (x \right )} + A b x + B a x + \frac {B b x^{2}}{2} & \text {for}\: m = -1 \\\frac {A a m^{2} x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {5 A a m x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {6 A a x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {A b m^{2} x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {4 A b m x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {3 A b x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {B a m^{2} x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {4 B a m x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {3 B a x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {B b m^{2} x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {3 B b m x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {2 B b x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 143 vs.
\(2 (45) = 90\).
time = 1.73, size = 143, normalized size = 3.18 \begin {gather*} \frac {B b m^{2} x^{3} x^{m} + B a m^{2} x^{2} x^{m} + A b m^{2} x^{2} x^{m} + 3 \, B b m x^{3} x^{m} + A a m^{2} x x^{m} + 4 \, B a m x^{2} x^{m} + 4 \, A b m x^{2} x^{m} + 2 \, B b x^{3} x^{m} + 5 \, A a m x x^{m} + 3 \, B a x^{2} x^{m} + 3 \, A b x^{2} x^{m} + 6 \, A a x x^{m}}{m^{3} + 6 \, m^{2} + 11 \, m + 6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.44, size = 95, normalized size = 2.11 \begin {gather*} x^m\,\left (\frac {x^2\,\left (A\,b+B\,a\right )\,\left (m^2+4\,m+3\right )}{m^3+6\,m^2+11\,m+6}+\frac {B\,b\,x^3\,\left (m^2+3\,m+2\right )}{m^3+6\,m^2+11\,m+6}+\frac {A\,a\,x\,\left (m^2+5\,m+6\right )}{m^3+6\,m^2+11\,m+6}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________